/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ez2find.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

/**
 *
 * @author Owner
 */
@NamedQueries(value={@NamedQuery(name="listAllJobs", query="SELECT j FROM Job j"),
                     @NamedQuery(name="lastJobCode", query="SELECT MAX(j.code) FROM Job j")})

@Entity
public class Job extends Post implements Serializable{

    private String compensation;
    //Other Stuff
    private boolean telecommuting;
    private boolean partTime;
    private boolean contract;
    private boolean nonProfit;
    private boolean intership;
    //Permissions
    private boolean directContact;
    private boolean phoneCalls;
    private boolean othersContact;
    private boolean forPersonsDisabilities;
    @ManyToMany()
    private List<CategoriaTrabajo> jobCategories;
    private int numCategories;
    private String purchaseOrder;
    
    public Job(){
        jobCategories=new ArrayList<CategoriaTrabajo>();
    }
    
    public String getCompensation() {
        return compensation;
    }

    public void setCompensation(String compensation) {
        this.compensation = compensation;
    }

    public boolean isTelecommuting() {
        return telecommuting;
    }

    public void setTelecommuting(boolean telecommuting) {
        this.telecommuting = telecommuting;
    }

    public boolean isPartTime() {
        return partTime;
    }

    public void setPartTime(boolean partTime) {
        this.partTime = partTime;
    }

    public boolean isContract() {
        return contract;
    }

    public void setContract(boolean contract) {
        this.contract = contract;
    }

    public boolean isNonProfit() {
        return nonProfit;
    }

    public void setNonProfit(boolean nonProfit) {
        this.nonProfit = nonProfit;
    }

    public boolean isIntership() {
        return intership;
    }

    public void setIntership(boolean intership) {
        this.intership = intership;
    }

    public boolean isDirectContact() {
        return directContact;
    }

    public void setDirectContact(boolean directContact) {
        this.directContact = directContact;
    }

    public boolean isPhoneCalls() {
        return phoneCalls;
    }

    public void setPhoneCalls(boolean phoneCalls) {
        this.phoneCalls = phoneCalls;
    }

    public boolean isOthersContact() {
        return othersContact;
    }

    public void setOthersContact(boolean othersContact) {
        this.othersContact = othersContact;
    }

    public boolean isForPersonsDisabilities() {
        return forPersonsDisabilities;
    }

    public void setForPersonsDisabilities(boolean forPersonsDisabilities) {
        this.forPersonsDisabilities = forPersonsDisabilities;
    }

    public int getNumCategories() {
        return numCategories;
    }

    public void setNumCategories(int numCategories) {
        this.numCategories = numCategories;
    }

    public List<CategoriaTrabajo> getJobCategories() {
        return jobCategories;
    }

    public void setJobCategories(List<CategoriaTrabajo> jobCategories) {
        this.jobCategories = jobCategories;
    }

    public String getPurchaseOrder() {
        return purchaseOrder;
    }

    public void setPurchaseOrder(String purchaseOrder) {
        this.purchaseOrder = purchaseOrder;
    }
    
}
